package com.zhongpengcheng.blog.event;

import com.alibaba.fastjson.JSON;
import lombok.Getter;
import org.springframework.context.ApplicationEvent;

/**
 * 文件删除后处理事件
 * @author ZhongPengCheng
 * @version 1.0
 * @since 2021-12-04 23:11:00
 */
@Getter
public class FileDeleteEvent extends ApplicationEvent {
    private static final long serialVersionUID = -7927117638794501397L;
    /**
     * 文件的OSS路径
     */
    private final String path;

    public FileDeleteEvent(String path) {
        super("api");
        this.path = path;
    }

    @Override
    public String toString() {
        return JSON.toJSONString(this);
    }
}
